﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	619保健品点评网 -- 百科列表
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
    <link href="../../Content/css/Instance/Article/ArticleList.css" rel="stylesheet" type="text/css" />
    <link href="../../Content/css/Component/jquery-ui/jquery.ui.tabs.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/Component/jquery-1.6.2.js" type="text/javascript"></script>
    <script src="../../Scripts/Component/jquery.ui.core.js" type="text/javascript"></script>
    <script src="../../Scripts/Component/jquery.ui.widget.js" type="text/javascript"></script>
    <script src="../../Scripts/Component/jquery.ui.tabs.js" type="text/javascript"></script>
    <script src="../../Scripts/Instance/Article/keyWordList.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $("#tabs").tabs({
                event: "mouseover"
            });
        });
	</script>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <div id="navigation"> 
        <span>您现在的位置： <a href="/Home/Index">首页</a> ></span>
        <span > <a href="/Article/ArticleIndex">百科列表</a> </span> 
        <% if (ViewData["keyWord"] != null)
           { %>
           <span > <a href="" class="current_nav">关键字：<%=ViewData["keyWord"]%></a></span>
        <%} %>
    </div>

    <div id="directtrain">
        <div class="title">快速导航</div>
        <ul >
        <%System.Data.DataSet ds_cate = (new _619BJP.Web.Controllers.ArticleController()).GetArticleCategory();
          for (int i = 0; i < ds_cate.Tables[0].Rows.Count; i++)
          {
              if (ViewData["CategoryID"] != null)
              {
                  int categoryID = (int)ViewData["CategoryID"]; %>
            <li>
                <div class="icon"></div>
                <%if (Html.Encode(ds_cate.Tables[0].Rows[i]["category_id"]).Equals(categoryID.ToString()))
                  {%>
                    <a class="selected" href="/Article/ArticleList/<%=ds_cate.Tables[0].Rows[i]["category_id"].ToString() %>"><%= Html.Encode(ds_cate.Tables[0].Rows[i]["category_name"])%></a>
                  <%}
                  else
                  {%>
                    <a href="/Article/ArticleList/<%=ds_cate.Tables[0].Rows[i]["category_id"].ToString() %>"><%= Html.Encode(ds_cate.Tables[0].Rows[i]["category_name"])%></a>
                  <%} %>
                
            </li>
        <%}
              else
              {%>
            <li>
                <div class="icon"></div>
                <a href="/Article/ArticleList/<%=ds_cate.Tables[0].Rows[i]["category_id"].ToString() %>"><%= Html.Encode(ds_cate.Tables[0].Rows[i]["category_name"])%></a>         
            </li>
          <%}
          } %>
        </ul>
    </div>

    <div id="article_list">
        <div id="list_title"><span>保健常识</span></div>
        <div id="article_list_detail">
            <ul>
                <%System.Data.DataSet ds = (System.Data.DataSet)ViewData.Model; %>
                <%if(ds.Tables[0].Rows.Count>0){
                      for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                      {
                          string title = (new _619BJP.Web.Controllers.ArticleController()).TitleForShort(Html.Encode(ds.Tables[0].Rows[i]["title"]),20);
                          %>
                <li>
                    <div class="aticle_name"><a href="/Article/ArticleDetails/<%= Html.Encode(ds.Tables[0].Rows[i]["id"])%>"><%=title%> </a></div>
                    <div class="createtime"><%= Convert.ToDateTime(ds.Tables[0].Rows[i]["created_time"]).ToString("yyyy-MM-dd")%></div>
                </li>
                <%}
                  } %>
            </ul>
        </div>
        <div id="page_turn">
			<ul id="page_turn_list">
				<li id="page_turn_next_page" class="page_turn_other_page"><a href="#">下一页</a></li>
				<li class="page_turn_other_page"><a href="#">5</a></li>
				<li class="page_turn_ellipsis">...</li>
				<li class="page_turn_other_page"><a href="#">2</a></li>
				<li class="page_turn_now_page"><a href="#">1</a></li>
			</ul>
		</div>
    </div>

    <div id="article_recommend">
        <div class="title">精彩推荐</div>
        <div id="tabs">
            <ul id="recomment_tab">
                <li id="tab_new"><a href="#article_new_list">最 新</a></li>
                <li id="tab_hot"><a href="#article_hot_list">最 热</a></li>
            </ul>

            <div id="article_new_list" class="article_list">
            <ul>
                <%System.Data.DataSet ds_new = (new _619BJP.Web.Controllers.ArticleController()).GetNewArticle();
                  for (int i = 0; i < 3; i++)
                  {
                %>
                <li>
                    <div class="rank_num_top"><span><%=i + 1%></span></div>
                    <div class="article_name"> 
                        <a href="/Article/ArticleDetails/<%= Html.Encode(ds_new.Tables[0].Rows[i]["id"])%>" title="<%=Html.Encode(ds_new.Tables[0].Rows[i]["title"]) %>">
                        <%string title = (new _619BJP.Web.Controllers.ArticleController()).TitleForShort(Html.Encode(ds_new.Tables[0].Rows[i]["title"]),14);%>
                        <%= title%>
                        </a>
                    </div>
                </li>
                <%}
                  for (int j = 3; j < 10; j++)
                  {
                %>
                <li>
                    <div class="rank_num"><span><%=j + 1%></span></div>
                    <div class="article_name">
                        <a href="/Article/ArticleDetails/<%= Html.Encode(ds_new.Tables[0].Rows[j]["id"])%>" title="<%=Html.Encode(ds_new.Tables[0].Rows[j]["title"]) %>">
                        <%string title = Html.Encode(ds_new.Tables[0].Rows[j]["title"]);
                          if(title.Length>15){
                              title = title.Substring(0, 14) + " ...";
                          }%>
                        <%= title%>
                        </a>
                    </div>
                </li>
                <%} %>                 
            </ul>
        </div>

            <div id="article_hot_list" class="article_list">
            <ul>
                <%System.Data.DataSet ds_hot = (new _619BJP.Web.Controllers.ArticleController()).GetHotArticle();
                  for (int i = 0; i < 3; i++)
                  {
                %>
                <li>
                    <div class="rank_num_top"><span><%=i + 1%></span></div>
                    <div class="article_name">
                        <a href="/Article/ArticleDetails/<%= Html.Encode(ds_hot.Tables[0].Rows[i]["id"])%>" title="<%=Html.Encode(ds_hot.Tables[0].Rows[i]["title"]) %>">
                            <%string title = Html.Encode(Html.Encode(ds_hot.Tables[0].Rows[i]["title"]));
                              if(title.Length>15){
                                  title = title.Substring(0, 14) + " ...";
                              }%>
                            <%= title%>
                        </a>
                    </div>
                </li>
                <%}
                  for (int j = 3; j < 10; j++)
                  {
                %>
                <li>
                    <div class="rank_num"><span><%=j + 1%></span></div>
                    <div class="article_name">
                        <a href="/Article/ArticleDetails/<%= Html.Encode(ds_hot.Tables[0].Rows[j]["id"])%>" title="<%=Html.Encode(ds_hot.Tables[0].Rows[j]["title"]) %>">
                            <%string title = Html.Encode(Html.Encode(ds_hot.Tables[0].Rows[j]["title"]));
                              if(title.Length>15){
                                  title = title.Substring(0, 14) + " ...";
                              }%>
                            <%= title%>
                        </a>
                    </div>
                </li>
                <%} %>                 
            </ul>
        </div>
        </div>
    </div>

    <div id="keyWord">
        <div class="title">热门搜索</div>
        <div id="keyWord_list">
            <a href="/0/日常">长寿保健</a> 
            <a href="/0/日常">日常保健</a> 
            <a href="/0/咖啡">咖啡保健</a> 
            <a href="/0/针灸">针灸保健</a> 
            <a href="/0/女性">女性保健</a> 
            <a href="/0/经期">经期保健</a> 
            <a href="/0/保健">保健方法</a> 
            <a href="/0/亚健康">亚健康保健</a> 
            <a href="/0/误区">保健误区</a> 
            <a href="/0/养生">养生保健</a> 
            <a href="/0/冬季">冬季保健</a> 
            <a href="/0/孕期">孕期保健</a> 
            <a href="/0/养生">保健养生</a> 
            <a href="/0/老年">老年保健</a> 
            <a href="/0/膳食">膳食保健</a> 
            <a href="/0/食疗">保健食疗</a> 
            <a href="/0/饮食">饮食保健</a> 
            <a href="/0/幼儿">幼儿保健</a> 
        </div>
    </div>

    <div id="ad_1">
        <img  src="../../AdImages/ad_1.jpg" alt=""/>
    </div>

</asp:Content>
